# Maintainer:
pkgname=py3-rjsmin
pkgver=1.2.2
pkgrel=1
pkgdesc="Fast javascript minifier for Python"
url="https://github.com/ndparker/rjsmin/tags"
arch="all"
license="Apache-2.0"
makedepends="python3-dev py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ndparker/rjsmin/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/rjsmin-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
6df5abe25b56e10a9ed23715a507990965a537a1e2add4984c7ee6732f9aa580d62f18785b0361dc73929e26c0d4ce4c73cad2560132f6a31b8233fc91cb3bdf  py3-rjsmin-1.2.2.tar.gz
"
